package com.tianyi.sfzy1.mapper;

import com.tianyi.sfzy1.domain.Audio;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Lenovo
* @description 针对表【audio(音频表)】的数据库操作Mapper
* @createDate 2025-01-02 11:46:53
* @Entity com.tianyi.sfzy1.domain.Audio
*/
@Mapper
public interface AudioMapper {

    //根据id删除音频
//    int deleteByPrimaryKey(Long id);

    int deleteByAudioIds(@Param("audioIds") List<Integer> audioIds);

  //插入音频
    int insert(Audio record);

    int insertSelective(Audio record);
//根据id查询音频
    Audio selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Audio record);
     //更新音频
    int updateByPrimaryKey(Audio record);
    //音频和咨询师课程的关联
    List<Audio> selectAudioWithCourseTypeAndConsultantByFields(
            @Param("title") String title,
            @Param("courseTypeName") String courseTypeName,
            @Param("consultantRealname") String consultantRealname,
    @Param("audioId") String audioId);
//模糊查询
    List<Audio> selectAll(Audio audio);

}
